let ErrorUtils = require('../utils/error/ErrorUtils');
let LoginService = require('../service/login');
let ResponseUtils = require('../utils/ResponseUtils');
let config=require('../config');
const {infoLogger, errorLogger} = config.logger;

class LoginController {
    static async login(ctx) {
        let data = ctx.request.body;
        let result = await LoginService.login(data);
        ctx.body = ResponseUtils.builder(result).success().build();
    }
    static async login1(ctx) {
        let result = {'name':'bobo','sex':12};
        ctx.body = ResponseUtils.builder(result).success().build();
    }
}

module.exports = LoginController;
